<template>
    <div>
      <div class="nav">
        <router-link to="/gerenxinxi">
          <img src="../../assets/lyl/image/tuijian/BMQD-1.png" alt="">
        </router-link>
        <p>我的邀请码</p>
      </div>

      <div class="content">
        <div class="tou">
          <router-link to="/mine">
            <img :src="src" alt="">
            <span>{{nis}}</span>
          </router-link>
        </div>

        <div class="foot">
          <p>我的邀请码：{{shuzi}}</p>
          <button @click="al()">分享邀请码  邀请好友注册吧</button>
        </div>
      </div>
    </div>
</template>

<script>
  import faker from 'faker'
    export default {
      name: "Yaoqima",
      data(){
        return {
          src:faker.image.avatar(),
          shuzi:1234567890
        }
      },
      computed:{
        nis(){
          return this.$store.state.nichen;
        }
      },
      methods:{
        al(){
          alert('已复制'+this.shuzi+'去微信朋友圈粘贴吧！')
        }
      }
    }
</script>

<style scoped>
  .nav{
    width: 100%;
    background: #e53e42;
    padding: 3.5rem 0;
    display: flex;
    justify-content: center;
  }
  .nav a{
    position: absolute;
    left: 2rem;
    color: #fff;
    font-size: 34px;
  }
  .nav p{
    font-size: 34px;
    color:#fff;
  }

  .content{
    padding: 4.8rem 2rem 0 2rem;
    background: #f2f2f2;
    height: 100%;
  }
  .content .tou a img{
    display: inline-block;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    margin-right: 1rem;
  }
  .content .tou a span:nth-child(2){
    font-size: 30px;
    line-height: 10rem;
    vertical-align: top;
    background: #f2f2f2;
  }
  .tou{
    margin-bottom: 7rem;
  }
  .content .foot{
    text-align: center;
  }
  .content .foot p{
    font-size: 30px;
    margin-bottom: 5rem;
  }
  .content .foot button{
    width: 52rem;
    height: 6rem;
    background: #e53e42;
    border-radius: 3rem;
    font-size: 28px;
    color: #fff;
  }
</style>
